package springboottask.service;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

@Service
public class ScheduledService {

    /**
     * second, minute, hour, day of month, month, and day of week.
     * {@code "0 * * * * MON-FRI"}
     */
    //@Scheduled(cron = "0 * * * * MON-FRI")
    //@Scheduled(cron = "0,1,2,3,4 * * * * MON-FRI")
    //@Scheduled(cron = "0-4 * * * * MON-FRI")
    //@Scheduled(cron = "0/4 * * * * MON-FRI") //每四秒打印一个
    @Scheduled(cron = "0 30 15 ? * MON")
    public void hello(){
        System.out.println("hello....");
    }

}
